package com.yanqu.road.entity.activity.bulletscreen;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_u_activity_barrage_msg")
public class ActivityBarrageMessage extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", update = true, select = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "内容ID", update = true)
    private long contentId;

    @FieldTypeAnnotation(desc = "用户ID", update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "弹幕内容")
    private String content;

    @FieldTypeAnnotation(desc = "弹幕时间")
    private long postTime;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public long getContentId() {
        return contentId;
    }

    public void setContentId(long contentId) {
        if(this.contentId != contentId) {
            this.contentId = contentId;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        if(!Objects.equals(this.content, content)) {
            this.content = content;
            setUpdateOption();
        }
    }

    public long getPostTime() {
        return postTime;
    }

    public void setPostTime(long postTime) {
        if(this.postTime != postTime) {
            this.postTime = postTime;
            setUpdateOption();
        }
    }

}
